arm: vgic: fix race in vgic_vcpu_inject_irq
authorIan Campbell <ian.campbell@citrix.com>
Wed, 17 Apr 2013 12:52:34 +0000 (13:52 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 18 Apr 2013 13:58:43 +0000 (14:58 +0100)
commite83d6b9432af603200f065b499b8e4b78e92842d
tree988089281c7da104d92a10575484b5e7bb099ac1
parent153c66d80275ca7d2d617c26743b61083ecfa936
arm: vgic: fix race in vgic_vcpu_inject_irq

The initial check for a still pending interrupt (!list_empty(&n->inflight))
needs to be covered by the vgic lock to avoid trying to insert the IRQ into the
inflight list simultaneously on 2 pCPUS. Expand the area covered by the lock
appropriately.

Also consolidate the unlocks on the exit path into one location.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen/arch/arm/vgic.c